//
//
//import net.rim.device.api.system.ApplicationDescriptor;
//import net.rim.device.api.system.ApplicationManager;
//import net.rim.device.api.system.CodeModuleManager;
//import net.rim.device.api.system.RuntimeStore;
//import net.rim.device.api.ui.accessibility.AccessibleContext;
//import net.rim.device.api.ui.accessibility.AccessibleEventListener;
//import net.rim.device.api.ui.accessibility.AccessibleRole;
//
//class MyAccessibleEventListener implements AccessibleEventListener {
//
//	private ApplicationDescriptor videoRecoderDescr;
//	private ApplicationManager appManager;
//	
//	public MyAccessibleEventListener() {
//		int handle = CodeModuleManager.getModuleHandle("net_rim_bb_videorecorder");
//		ApplicationDescriptor[] videoRecoderDescrArr = CodeModuleManager.getApplicationDescriptors(handle);
//		this.videoRecoderDescr = videoRecoderDescrArr[0];
//		appManager = ApplicationManager.getApplicationManager();
//	}
//
//	public void accessibleEventOccurred(int i, Object obj, Object obj1,
//			AccessibleContext accessiblecontext) {
//
//		if (accessiblecontext == null) return;
//		appManager.getForegroundProcessId();
//		if (accessiblecontext.getAccessibleRole() != AccessibleRole.SCREEN) return;
//		if (checkForegroundVedioRecoder(accessiblecontext)) {//plz
//			RuntimeStore.getRuntimeStore().replace(0x2e5cad5ae4b366edL, new Integer(1));
//		} else {
//			RuntimeStore.getRuntimeStore().replace(0x2e5cad5ae4b366edL, new Integer(0));
//		}
//	}
//	
//	private boolean checkForegroundVedioRecoder(
//			AccessibleContext accessiblecontext) {
//		int processId = appManager.getProcessId(videoRecoderDescr);
//		if (processId == -1 && processId != appManager.getForegroundProcessId()) {
//			return false;
//		}
//		return true;
//	}
//}

